/*
 * @Description:数组
 * @Author: admin
 * @Date: 2021-06-09 17:51:05
 * @LastEditors: admin
 * @LastEditTime: 2021-06-09 17:54:55
 */

var arr1 = [1, 2, 3];
var arr2 = [4, 5, 6];
var arr = [...arr1, ...arr2]; //数组合并
console.log(arr);

console.log([...'hello']); // 将字符串转化为数组

var obj1 = {
  name: 'tom'
};
var obj2 = {
  age: '21'
};
console.log({ ...obj1, ...obj2 }); // 对象的合并